function C57_CPP_Event_Rate_Dist_Plot(Data_Summary)
%% Step 1: Collect all Data

% C57_5
[C5_saline] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, 'saline', 'C57_5');
[C5_cpp1] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 1mg/kg', 'C57_5');
[C5_cpp3] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 3mg/kg', 'C57_5');
[C5_cpp10] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 10mg/kg', 'C57_5');

% C57_6
[C6_saline] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, 'saline', 'C57_6');
[C6_cpp1] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 1mg/kg', 'C57_6');
[C6_cpp3] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 3mg/kg', 'C57_6');
[C6_cpp10] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 10mg/kg', 'C57_6');

% C57_7
[C7_saline] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, 'saline', 'C57_7');
[C7_cpp1] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 1mg/kg', 'C57_7');
[C7_cpp3] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 3mg/kg', 'C57_7');
[C7_cpp10] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 10mg/kg', 'C57_7');

% C57_8
[C8_saline] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, 'saline', 'C57_8');
[C8_cpp1] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 1mg/kg', 'C57_8');
[C8_cpp3] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 3mg/kg', 'C57_8');
[C8_cpp10] = Event_Rate_Mean_Dist_One_Animal_One_Dose(Data_Summary, '(R)_CPP 10mg/kg', 'C57_8');

%% Step 2: Organize & Summarize Data

% for WT animals
saline = cat(1, C5_saline, C6_saline, C7_saline, C8_saline); 
for n = 1:size(saline, 2)
    saline_M (1,n) = mean(saline(:,n));
    saline_SE (1,n) = calculate_standard_error(saline(:,n));
end

cpp1 = cat(1, C5_cpp1, C6_cpp1, C7_cpp1, C8_cpp1);
for n = 1:size(cpp1, 2)
    cpp1_M (1,n) = mean(cpp1(:,n));
    cpp1_SE (1,n) = calculate_standard_error(cpp1(:,n));
end

cpp3 = cat(1, C5_cpp3, C6_cpp3, C7_cpp3, C8_cpp3);
for n = 1:size(cpp3, 2)
    cpp3_M (1,n) = mean(cpp3(:,n));
    cpp3_SE (1,n) = calculate_standard_error(cpp3(:,n));
end

cpp10 = cat(1, C5_cpp10, C6_cpp10, C7_cpp10, C8_cpp10);
for n = 1:size(cpp10, 2)
    cpp10_M (1,n) = mean(cpp10(:,n));
    cpp10_SE (1,n) = calculate_standard_error(cpp10(:,n));
end

%% plotting 

% define boundary
Upper_Bound=0.5;
Lower_Bound=0; 
Interval=0.02; 

figure
subplot(1,4,1)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),saline_M,1,'FaceColor','#2AF598');
xlim([0 0.5]); ylim([0 0.3]);
xlabel('Event Rate (Hz)');
ylabel('Mean Fraction of Cells');
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound), saline_M, [], saline_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None'; 
hold off
set(gca,'FontSize',18); 
title('Saline','FontSize',20);

subplot(1,4,2)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),cpp1_M,1,'FaceColor','#1BD7BB');
xlim([0 0.5]); ylim([0 0.3]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),cpp1_M,[],cpp1_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
title('(R)-CPP 1mg/kg','FontSize',20);

subplot(1,4,3)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),cpp3_M,1,'FaceColor','#08B3E5');
xlim([0 0.5]); ylim([0 0.3]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),cpp3_M,[],cpp3_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
title('3mg/kg','FontSize',20);

subplot(1,4,4)
bar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),cpp10_M,1,'FaceColor','#003193');
xlim([0 0.5]); ylim([0 0.3]);
hold on
er = errorbar((Lower_Bound+0.5*Interval:Interval:Upper_Bound),cpp10_M,[],cpp10_SE,'LineWidth',1);    
er.Color = [0 0 0];                            
er.LineStyle = 'None';
hold off
set(gca,'FontSize',18); 
title('10mg/kg','FontSize',20);

end